<!DOCTYPE html>
<!--suppress ALL-->
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<aside class="main-sidebar" th:fragment="menu">
    <section class="sidebar">
        <ul class="sidebar-menu" data-widget="tree">
            <li class="treeview">
                <a href="#">
                    <i class="fa fa-dashboard"></i> <span>系统管理</span>
                    <span class="pull-right-container">
                        <i class="fa fa-angle-left pull-right"></i>
                    </span>
                </a>
                <ul class="treeview-menu">
                    <li shiro:hasPermission="department:list" name="department"><a href="/department/list"><i class="fa fa-circle-o"></i> 部门管理</a></li>
                    <li shiro:hasPermission="employee:list" name="employee"><a href="/employee/list"><i class="fa fa-circle-o"></i> 员工管理</a></li>
                    <li shiro:hasRole="admin" name="permission"><a href="/permission/list"><i class="fa fa-circle-o"></i> 权限管理</a></li>
                    <li shiro:hasPermission="role:list" name="role"><a href="/role/list"><i class="fa fa-circle-o"></i> 角色管理</a></li>
                </ul>
            </li>
            

        </ul>
    </section>
</aside>

<script>
    $(function () {
        //菜单初始
        $('.sidebar-menu').tree();
        //菜单激活
        var cuLi = $(".treeview-menu li[name='${currentMenu}']");
        cuLi.addClass("active");
        cuLi.closest(".treeview").addClass("active")
    })
</script>
</html>